<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center pointsRanking_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub pointsRanking_fd0_0'>
					<view class='flex flex-wrap align-center pointsRanking_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  pointsRanking_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
					</view>
					<view class='flex flex-wrap align-center justify-end pointsRanking_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#AD3823"></u-loading>
				<view>加载中</view>
			</view>
			
			<block v-else>
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
					<view class='flex flex-wrap align-center justify-center'>
						<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c0'>
							<text class='pointsRanking_fd1_0_c0_c0' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">第{{twoInfo.rank}}名</text>
							<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c0_c1'>
								<image class='pointsRanking_fd1_0_c0_c1_c0' mode="aspectFill" :src='twoInfo.head_img'>
								</image>
								<text class='pointsRanking_fd1_0_c0_c1_c1' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{twoInfo.user_nickname}}</text>
								<view class='flex flex-wrap align-center'>
									<text class='pointsRanking_fd1_0_c0_c1_c2_c0' style="font-family: D-DIN-PRO, D-DIN-PRO;">{{twoInfo.score}}</text>
									<image class='pointsRanking_fd1_0_c0_c1_c2_c1' mode="aspectFill"
										:src='STATIC_URL+"666.png"'></image>
								</view>
							</view>
						</view>
						<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c1'>
							<text class='pointsRanking_fd1_0_c1_c0' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">第{{oneInfo.rank}}名</text>
							<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c1_c1'>
								<image class='pointsRanking_fd1_0_c0_c1_c0' mode="aspectFill" :src='oneInfo.head_img'>
								</image>
								<text class='pointsRanking_fd1_0_c0_c1_c1' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{oneInfo.user_nickname}}</text>
								<view class='flex flex-wrap align-center'>
									<text class='pointsRanking_fd1_0_c0_c1_c2_c0' style="font-family: D-DIN-PRO, D-DIN-PRO;">{{oneInfo.score}}</text>
									<image class='pointsRanking_fd1_0_c0_c1_c2_c1' mode="aspectFill"
										:src='STATIC_URL+"666.png"'></image>
								</view>
							</view>
						</view>
						<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c2'>
							<text class='pointsRanking_fd1_0_c2_c0' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">第{{threeInfo.rank}}名</text>
							<view class='flex flex-direction flex-wrap align-center pointsRanking_fd1_0_c2_c1'>
								<image class='pointsRanking_fd1_0_c0_c1_c0' mode="aspectFill" :src='threeInfo.head_img'>
								</image>
								<text class='pointsRanking_fd1_0_c0_c1_c1' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{threeInfo.user_nickname}}</text>
								<view class='flex flex-wrap align-center'>
									<text class='pointsRanking_fd1_0_c0_c1_c2_c0' style="font-family: D-DIN-PRO, D-DIN-PRO;">{{threeInfo.score}}</text>
									<image class='pointsRanking_fd1_0_c0_c1_c2_c1' mode="aspectFill"
										:src='STATIC_URL+"666.png"'></image>
								</view>
							</view>
						</view>
					</view>
				</view>
				
				<!---flex布局flex布局结束-->
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout pointsRanking_flex_2">
					<view class='flex flex-direction flex-wrap align-stretch pointsRanking_fd2_0' v-for="(v, k) in list" :key="k">
						<view class='flex flex-wrap align-center pointsRanking_fd2_0_c0'>
							<view class='flex flex-wrap align-center justify-center pointsRanking_fd2_0_c0_c0'>
								<text class='pointsRanking_fd2_0_c0_c0_c0' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{v.rank}}</text>
							</view>
							<image class='pointsRanking_fd2_0_c0_c1' mode="aspectFill" :src='v.head_img'></image>
							<text class='pointsRanking_fd2_0_c0_c2' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{v.user_nickname}}</text>
							<view class='flex flex-wrap align-center pointsRanking_fd2_0_c0_c3'>
								<text class='pointsRanking_fd2_0_c0_c3_c0' style="font-family: D-DIN-PRO, D-DIN-PRO;">{{v.score}}</text>
								<image class='pointsRanking_fd2_0_c0_c3_c1' mode="aspectFill" :src='STATIC_URL+"670.png"'>
								</image>
							</view>
						</view>
					</view>
					
					<view class='flex flex-direction flex-wrap align-stretch pointsRanking_fd2_0 bottom_content'>
						<view class='flex flex-wrap align-center pointsRanking_fd2_5_c0'>
							<view class='flex flex-wrap align-center justify-center pointsRanking_fd2_0_c0_c0'>
								<text class='pointsRanking_fd2_0_c0_c0_c0' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{userInfo.rank}}</text>
							</view>
							<image class='pointsRanking_fd2_0_c0_c1' mode="aspectFill" :src='userInfo.head_img'></image>
							<text class='pointsRanking_fd2_5_c0_c2' style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;">{{userInfo.user_nickname}}</text>
							<view class='flex flex-wrap align-center pointsRanking_fd2_0_c0_c3'>
								<text class='pointsRanking_fd2_5_c0_c3_c0' style="font-family: D-DIN-PRO, D-DIN-PRO;">{{userInfo.score}}</text>
								<image class='pointsRanking_fd2_0_c0_c3_c1' mode="aspectFit" :src='STATIC_URL+"666.png"'>
								</image>
							</view>
						</view>
					</view>
				</view>
			</block>
			
		</view>
	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				"isShow": true,
				"userInfo": {},  // 本人信息
				"oneInfo": "",
				"twoInfo": "",
				"threeInfo": "",
				"list": [],  // 排行榜列表
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getdatalist();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 排行榜
			getdatalist() {
				this.$api.post(global.API_VERSION + '6551d6570f209',{
					
				}).then(res => {
					console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.userInfo = res.data.data.self;
						if (res.data.data.data.length > 0) {
							this.oneInfo = res.data.data.data[0];
							if (res.data.data.data.length > 1) {
								this.twoInfo = res.data.data.data[1];
								if (res.data.data.data.length > 2) {
									this.threeInfo = res.data.data.data[2];			
								}
							}
						}
						let arr = []
						if (res.data.data.data.length > 3) {
							arr = res.data.data.data.splice(3, res.data.data.data.length);
							this.list = arr;
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.bottom_content {
		position: fixed;
		bottom: 0rpx;
		width: 566rpx;
		margin: 0;
		padding-bottom: 48rpx;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://www.guochaoxiaoju.com/uploads/mini/663.png) no-repeat;
		background-size: 100% auto;
	}

	.pointsRanking_flex_0 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/663.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.pointsRanking_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: var(--benbenFontColor3);
	}

	.pointsRanking_fd0_0_c0 {
		width: 120rpx;
	}

	.pointsRanking_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.pointsRanking_fd1_0_c2_c1 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/667.png) no-repeat;
		background-size: 100% 100%;
		padding: 25rpx 0 23rpx 0;
		width: 207rpx;
		height: 210rpx;
	}

	.pointsRanking_fd1_0_c2_c0 {
		color: #FFFFFF;
		font-size: 62rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 19rpx 0rpx;
	}

	.pointsRanking_fd1_0_c2 {
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.pointsRanking_fd1_0_c1_c1 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/668.png) no-repeat;
		background-size: 100% 100%;
		padding: 25rpx 0 23rpx 0;
		width: 207rpx;
		height: 210rpx;
	}

	.pointsRanking_fd1_0_c1_c0 {
		color: #FFFFFF;
		font-size: 62rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.pointsRanking_fd1_0_c1 {
		margin: 0rpx 0rpx 38rpx 0rpx;
	}

	.pointsRanking_fd1_0_c0_c1_c2_c1 {
		width: 32rpx;
		height: 32rpx;
		margin: 0rpx 0rpx 0rpx 14rpx;
	}

	.pointsRanking_fd1_0_c0_c1_c2_c0 {
		color: #FFFFFF;
		font-size: 32rpx;
		font-weight: 700;
	}

	.pointsRanking_fd1_0_c0_c1_c1 {
		color: #FFFFFF;
		font-size: 30rpx;
		font-weight: 400;
		margin: 2rpx 0rpx 12rpx 0rpx;
		white-space: nowrap;
		// display: -webkit-box;
		// -webkit-box-orient: vertical;
		// -webkit-line-clamp: 1;
		// overflow: hidden;
	}

	.pointsRanking_fd1_0_c0_c1_c0 {
		width: 64rpx;
		height: 64rpx;
		border-radius: 32rpx;
	}

	.pointsRanking_fd1_0_c0_c1 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/664.png) no-repeat;
		background-size: 100% 100%;
		padding: 25rpx 0 23rpx 0;
		width: 207rpx;
		height: 210rpx;
	}

	.pointsRanking_fd1_0_c0_c0 {
		color: #FFFFFF;
		font-size: 62rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.pointsRanking_fd1_0_c0 {
		margin: 0rpx 16rpx 10rpx 0rpx;
	}

	.pointsRanking_flex_2 {
		padding: 0rpx 93rpx 0rpx 93rpx;
	}

	.pointsRanking_fd2_5_c0_c3_c0 {
		color: var(--benbenFontColor3);
		font-size: 32rpx;
		font-weight: 600;
		margin: 0rpx 10rpx 0rpx 0rpx;
	}

	.pointsRanking_fd2_5_c0_c2 {
		color: var(--benbenFontColor3);
		font-size: 28rpx;
		font-weight: 400;
	}

	.pointsRanking_fd2_5_c0 {
		background: #AD3823;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.pointsRanking_fd2_0_c0_c3_c1 {
		width: 32rpx;
		height: 32rpx;
		margin: 0rpx 27rpx 0rpx 0rpx;
	}

	.pointsRanking_fd2_0_c0_c3_c0 {
		color: #AD3823;
		font-size: 32rpx;
		font-weight: 600;
		margin: 0rpx 10rpx 0rpx 0rpx;
	}

	.pointsRanking_fd2_0_c0_c3 {
		margin: 0rpx 0rpx 0rpx auto;
	}

	.pointsRanking_fd2_0_c0_c2 {
		color: #AD3823;
		font-size: 28rpx;
		font-weight: 400;
	}

	.pointsRanking_fd2_0_c0_c1 {
		width: 60rpx;
		height: 60rpx;
		border-radius: 30rpx;
		margin: 0rpx 16rpx 0rpx 23rpx;
	}

	.pointsRanking_fd2_0_c0_c0_c0 {
		color: #FFFFFF;
		font-size: 26rpx;
		font-weight: 400;
	}

	.pointsRanking_fd2_0_c0_c0 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/669.png) no-repeat;
		width: 70rpx;
		height: 89rpx;
		background-size: 100% auto;
	}

	.pointsRanking_fd2_0_c0 {
		background: #F3E2CA;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.pointsRanking_fd2_0 {
		background: #E5CCA8;
		padding: 7rpx;
		background-size: 100% auto;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
</style>